/* ****************************************************************
   ****************************************************************
   * Com++ Professional (c) 2009 C++ World
   * http://www.cplusplusworld.com/ mailto:compp@cplusplusworld.com
   ****************************************************************
   ****************************************************************
*/

#ifndef _SHMEM_H
#define _SHMEM_H


namespace compp {
class ShMem
{
protected:
	int ShMemId;
	void *Addr;
	bool DestroyInDestructor;
public:
	ShMem( const int key, const int size, const int mode , bool exclusive  );
	ShMem( const int key, const int size, const int mode );
	virtual ~ShMem();
	int   getId();
	void *getStartAddr ( );
	void Attach() ;
	void Detach() ;
	void Destroy() ;
	void AutoDestroy( const bool on ) ;

};
}
#endif


